<html>
<head>
    <meta charset="utf-8">
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>我是首页~~~
<button onclick="getData()">点击访问请求测试走起</button>
</body>
<script>
    function getData() {
        $.ajax({
            type: 'POST',
            headers: {
                address: "255.665.874.21"
            },
            url: './test',
            data: {
                name: '我是名称'
            },
            success: function (data) {
                console.log(data)
            },
            dataType: "json"
        });
    }


</script>
</html>